import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
class Comment extends StatefulWidget {
  Comment({Key key}) : super(key: key);

  _CommentState createState() => _CommentState();
}

class _CommentState extends State<Comment>  with AutomaticKeepAliveClientMixin{
  
  bool get wantKeepAlive => true;
  @override
  Widget build(BuildContext context) {
    super.build(context);
    return Container(
//        key:widget.key,
    decoration: BoxDecoration(
      color: Colors.white
    ),
      padding: EdgeInsets.all(10.w),
       child: Column(
         children: [
           GestureDetector(
             onTap: (){
               Navigator.of(context).pushNamed('/comment_list');
             },
             child: Row(
                 mainAxisSize: MainAxisSize.max,
                 mainAxisAlignment: MainAxisAlignment.spaceBetween,
                 children:[
                   Text('用户评价'),
                   Row(
                     children: [
                       Text('100.00%',style: TextStyle(
                           color: Colors.red
                       ),),
                       Text('好评率'),
                       Icon(Icons.chevron_right)
                     ],
                   )
                 ]
             ),
           ),
           Divider(),
           Column(
             crossAxisAlignment: CrossAxisAlignment.start,
             children: [
               Row(
                 crossAxisAlignment: CrossAxisAlignment.center,
                 mainAxisSize: MainAxisSize.max,
                 mainAxisAlignment: MainAxisAlignment.start,
                 children: [
                   Container(
                     width: 30,height:30,
                     child: CircleAvatar(
                       backgroundImage:NetworkImage('https://www.runoob.com/wp-content/uploads/2013/12/java.jpg',) ,
                     ),
                   ),
                   SizedBox(
                     width:10.w
                   ),

                   Text('松。。土'),
                   SizedBox(
                       width:10.w
                   ),
                   Icon(Icons.star,size: 10,color: Colors.red,),
                   Icon(Icons.star,size: 10,color: Colors.red,),
                   Icon(Icons.star,size: 10,color: Colors.red,),
                   Icon(Icons.star,size: 10,color: Colors.red,),
                 ],
               ),
               SizedBox(
                 height: 10.w,
               ),
               Text('2020-05-22 09:53'),
               SizedBox(
                 height: 10.w,
               ),
               Text("好的"),
               SizedBox(
                 height: 10.w,
               ),
             ],
           )
         ],
       )
    );
  }
}